A non-volatile semiconductor memory may be employed as mass storage for a computer system (e.g., desktop, laptop, portable, etc.) or a consumer device (e.g., music player, cell phone, camera, etc.) or other suitable application. The non-volatile semiconductor memory may comprise one or more memory devices (such as a flash memory) and control circuitry for accessing each memory device. Each memory device is coupled to an I/O bus, as well as a number of interface control lines. When issuing a program command or an erase command to a memory device, the control circuitry transfers the address and command data (and write data for a program operation) over the I/O bus. When issuing a read command, the control circuitry transfers the address and command data over the I/O bus and then receives the read data over the I/O bus.
Each memory device typically comprises a number of blocks which are accessed a page at a time. For example, a single block may comprise 128 pages where each page comprises 4k bytes. Since a page typically cannot be overwritten without first being erased, a new page in a different block is typically selected to perform an “overwrite” operation. To facilitate relocating data to a different page, the non-volatile semiconductor memory implements indirect accessing wherein a logical block address (LBA) representing a data block is mapped to a physical block address (PBA) representing one of the pages. In this manner, when the page for a data block is moved, the LBA is simply reassigned to the new PBA.
Periodically the non-volatile semiconductor memory will perform a garbage collection operation wherein the remaining valid pages of a first block are relocated to a second block so that the first block can be erased (thereby erasing the invalid pages that were previously relocated during overwrite operations). It is desirable to minimize the amount of garbage collection in a non-volatile semiconductor memory in order to decrease write amplification and power consumption, as well as increase endurance and performance.